<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>XlibRGB</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
<link rel="home" href="index.html" title="The gdk-pixbuf Library">
<link rel="up" href="rn01.html" title="API Reference">
<link rel="prev" href="gdk-pixbuf-gdk-pixbuf-xlib-from-drawables.html" title="X Drawables to Pixbufs">
<link rel="next" href="rn02.html" title="Tools Reference">
<meta name="generator" content="GTK-Doc V1.11 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="reference" href="rn01.html" title="API Reference">
<link rel="reference" href="rn02.html" title="Tools Reference">
<link rel="index" href="api-index-full.html" title="Index of all symbols">
<link rel="index" href="api-index-deprecated.html" title="Index of deprecated symbols">
<link rel="index" href="api-index-2-2.html" title="Index of new symbols in 2.2">
<link rel="index" href="api-index-2-4.html" title="Index of new symbols in 2.4">
<link rel="index" href="api-index-2-6.html" title="Index of new symbols in 2.6">
<link rel="index" href="api-index-2-8.html" title="Index of new symbols in 2.8">
<link rel="index" href="api-index-2-10.html" title="Index of new symbols in 2.10">
<link rel="index" href="api-index-2-12.html" title="Index of new symbols in 2.12">
<link rel="index" href="api-index-2-14.html" title="Index of new symbols in 2.14">
<link rel="appendix" href="apa.html" title="Appendix A. Porting applications from Imlib to gdk-pixbuf">
<link rel="appendix" href="license.html" title="Appendix B. License">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="gdk-pixbuf-gdk-pixbuf-xlib-from-drawables.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="rn01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">The gdk-pixbuf Library</th>
<td><a accesskey="n" href="rn02.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#gdk-pixbuf-gdk-pixbuf-xlib-rgb.synopsis" class="shortcut">Top</a>
                 | 
                <a href="#gdk-pixbuf-gdk-pixbuf-xlib-rgb.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry" lang="en">
<a name="gdk-pixbuf-gdk-pixbuf-xlib-rgb"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="gdk-pixbuf-gdk-pixbuf-xlib-rgb.top_of_page"></a>XlibRGB</span></h2>
<p>XlibRGB — Rendering RGB buffers to X drawables.</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="gdk-pixbuf-gdk-pixbuf-xlib-rgb.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">

#include &lt;gdk-pixbuf/gdk-pixbuf.h&gt;

                    <a class="link" href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#XlibRgbCmap" title="XlibRgbCmap">XlibRgbCmap</a>;
enum                <a class="link" href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#XlibRgbDither" title="enum XlibRgbDither">XlibRgbDither</a>;
void                <a class="link" href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#xlib-rgb-init" title="xlib_rgb_init ()">xlib_rgb_init</a>                       (Display *display,
                                                         Screen *screen);
void                <a class="link" href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#xlib-rgb-init-with-depth" title="xlib_rgb_init_with_depth ()">xlib_rgb_init_with_depth</a>            (Display *display,
                                                         Screen *screen,
                                                         int prefDepth);
unsigned long       <a class="link" href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#xlib-rgb-xpixel-from-rgb" title="xlib_rgb_xpixel_from_rgb ()">xlib_rgb_xpixel_from_rgb</a>            (<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
>guint32</a> rgb);
void                <a class="link" href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#xlib-rgb-gc-set-foreground" title="xlib_rgb_gc_set_foreground ()">xlib_rgb_gc_set_foreground</a>          (GC gc,
                                                         <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
>guint32</a> rgb);
void                <a class="link" href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#xlib-rgb-gc-set-background" title="xlib_rgb_gc_set_background ()">xlib_rgb_gc_set_background</a>          (GC gc,
                                                         <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
>guint32</a> rgb);
void                <a class="link" href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#xlib-draw-rgb-image" title="xlib_draw_rgb_image ()">xlib_draw_rgb_image</a>                 (Drawable drawable,
                                                         GC gc,
                                                         int x,
                                                         int y,
                                                         int width,
                                                         int height,
                                                         <a class="link" href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#XlibRgbDither" title="enum XlibRgbDither">XlibRgbDither</a> dith,
                                                         unsigned char *rgb_buf,
                                                         int rowstride);
void                <a class="link" href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#xlib-draw-rgb-image-dithalign" title="xlib_draw_rgb_image_dithalign ()">xlib_draw_rgb_image_dithalign</a>       (Drawable drawable,
                                                         GC gc,
                                                         int x,
                                                         int y,
                                                         int width,
                                                         int height,
                                                         <a class="link" href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#XlibRgbDither" title="enum XlibRgbDither">XlibRgbDither</a> dith,
                                                         unsigned char *rgb_buf,
                                                         int rowstride,
                                                         int xdith,
                                                         int ydith);
void                <a class="link" href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#xlib-draw-rgb-32-image" title="xlib_draw_rgb_32_image ()">xlib_draw_rgb_32_image</a>              (Drawable drawable,
                                                         GC gc,
                                                         int x,
                                                         int y,
                                                         int width,
                                                         int height,
                                                         <a class="link" href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#XlibRgbDither" title="enum XlibRgbDither">XlibRgbDither</a> dith,
                                                         unsigned char *buf,
                                                         int rowstride);
void                <a class="link" href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#xlib-draw-gray-image" title="xlib_draw_gray_image ()">xlib_draw_gray_image</a>                (Drawable drawable,
                                                         GC gc,
                                                         int x,
                                                         int y,
                                                         int width,
                                                         int height,
                                                         <a class="link" href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#XlibRgbDither" title="enum XlibRgbDither">XlibRgbDither</a> dith,
                                                         unsigned char *buf,
                                                         int rowstride);
<a class="link" href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#XlibRgbCmap" title="XlibRgbCmap">XlibRgbCmap</a> *       <a class="link" href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#xlib-rgb-cmap-new" title="xlib_rgb_cmap_new ()">xlib_rgb_cmap_new</a>                   (<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
>guint32</a> *colors,
                                                         int n_colors);
void                <a class="link" href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#xlib-rgb-cmap-free" title="xlib_rgb_cmap_free ()">xlib_rgb_cmap_free</a>                  (<a class="link" href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#XlibRgbCmap" title="XlibRgbCmap">XlibRgbCmap</a> *cmap);
void                <a class="link" href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#xlib-draw-indexed-image" title="xlib_draw_indexed_image ()">xlib_draw_indexed_image</a>             (Drawable drawable,
                                                         GC gc,
                                                         int x,
                                                         int y,
                                                         int width,
                                                         int height,
                                                         <a class="link" href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#XlibRgbDither" title="enum XlibRgbDither">XlibRgbDither</a> dith,
                                                         unsigned char *buf,
                                                         int rowstride,
                                                         <a class="link" href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#XlibRgbCmap" title="XlibRgbCmap">XlibRgbCmap</a> *cmap);
Bool                <a class="link" href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#xlib-rgb-ditherable" title="xlib_rgb_ditherable ()">xlib_rgb_ditherable</a>                 (void);
void                <a class="link" href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#xlib-rgb-set-verbose" title="xlib_rgb_set_verbose ()">xlib_rgb_set_verbose</a>                (Bool verbose);
void                <a class="link" href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#xlib-rgb-set-install" title="xlib_rgb_set_install ()">xlib_rgb_set_install</a>                (Bool install);
void                <a class="link" href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#xlib-rgb-set-min-colors" title="xlib_rgb_set_min_colors ()">xlib_rgb_set_min_colors</a>             (int min_colors);
Colormap            <a class="link" href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#xlib-rgb-get-cmap" title="xlib_rgb_get_cmap ()">xlib_rgb_get_cmap</a>                   (void);
Visual *            <a class="link" href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#xlib-rgb-get-visual" title="xlib_rgb_get_visual ()">xlib_rgb_get_visual</a>                 (void);
XVisualInfo *       <a class="link" href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#xlib-rgb-get-visual-info" title="xlib_rgb_get_visual_info ()">xlib_rgb_get_visual_info</a>            (void);
int                 <a class="link" href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#xlib-rgb-get-depth" title="xlib_rgb_get_depth ()">xlib_rgb_get_depth</a>                  (void);
Display *           <a class="link" href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#xlib-rgb-get-display" title="xlib_rgb_get_display ()">xlib_rgb_get_display</a>                (void);
Screen *            <a class="link" href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#xlib-rgb-get-screen" title="xlib_rgb_get_screen ()">xlib_rgb_get_screen</a>                 (void);
</pre>
</div>
<div class="refsect1" lang="en">
<a name="gdk-pixbuf-gdk-pixbuf-xlib-rgb.description"></a><h2>Description</h2>
<p>
    The XlibRGB set of functions is a port of the <span class="type">GdkRGB</span> library to
    use plain Xlib and X drawables.  You can use these functions to
    render RGB buffers into drawables very quickly with high-quality
    dithering.
  </p>
</div>
<div class="refsect1" lang="en">
<a name="gdk-pixbuf-gdk-pixbuf-xlib-rgb.details"></a><h2>Details</h2>
<div class="refsect2" lang="en">
<a name="XlibRgbCmap"></a><h3>XlibRgbCmap</h3>
<pre class="programlisting">typedef struct {
  unsigned int colors[256];
  unsigned char lut[256]; /* for 8-bit modes */
} XlibRgbCmap;
</pre>
<p>
    FIXME: Describe this.
  </p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term">unsigned int <em class="structfield"><code>colors</code></em>[256];</span></p></td>
<td>FIXME.
</td>
</tr>
<tr>
<td><p><span class="term">unsigned char <em class="structfield"><code>lut</code></em>[256];</span></p></td>
<td>FIXME.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="XlibRgbDither"></a><h3>enum XlibRgbDither</h3>
<pre class="programlisting">typedef enum
{
  XLIB_RGB_DITHER_NONE,
  XLIB_RGB_DITHER_NORMAL,
  XLIB_RGB_DITHER_MAX
} XlibRgbDither;
</pre>
<p>
    These values are used to specify which dithering method should be
    used.  <span class="symbol">XLIB_RGB_DITHER_NONE</span> will use no dithering
    and simply map the colors in an RGB buffer to the closest colors
    that the display can provide.
    <span class="symbol">XLIB_RGB_DITHER_NORMAL</span> will provide dithering
    only on pseudocolor displays.
    <span class="symbol">XLIB_RGB_DITHER_MAX</span> will provide dithering on
    pseudocolor and 16-bit truecolor or “high color”
    displays.
  </p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="XLIB-RGB-DITHER-NONE--CAPS"></a><span class="term"><code class="literal">XLIB_RGB_DITHER_NONE</code></span></p></td>
<td>Specifies no dithering.
</td>
</tr>
<tr>
<td><p><a name="XLIB-RGB-DITHER-NORMAL--CAPS"></a><span class="term"><code class="literal">XLIB_RGB_DITHER_NORMAL</code></span></p></td>
<td>Specifies dithering only on pseudocolor
displays.
</td>
</tr>
<tr>
<td><p><a name="XLIB-RGB-DITHER-MAX--CAPS"></a><span class="term"><code class="literal">XLIB_RGB_DITHER_MAX</code></span></p></td>
<td>Specifies dithering on high color displays.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="xlib-rgb-init"></a><h3>xlib_rgb_init ()</h3>
<pre class="programlisting">void                xlib_rgb_init                       (Display *display,
                                                         Screen *screen);</pre>
<p>
Initializes the XlibRGB machinery with the default depth.  If you use this
function XlibRGB will automatically pick the best visual available on your
display.  This function or <a class="link" href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#xlib-rgb-init-with-depth" title="xlib_rgb_init_with_depth ()"><code class="function">xlib_rgb_init_with_depth()</code></a> must be called before
using any of the other functions in XlibRGB.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>display</code></em> :</span></p></td>
<td> X Display to use.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>screen</code></em> :</span></p></td>
<td> Screen to use.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="xlib-rgb-init-with-depth"></a><h3>xlib_rgb_init_with_depth ()</h3>
<pre class="programlisting">void                xlib_rgb_init_with_depth            (Display *display,
                                                         Screen *screen,
                                                         int prefDepth);</pre>
<p>
Initializes the XlibRGB machinery with a particular depth you specify,
instead of automatically picking the best depth in the display.  This
function or <a class="link" href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#xlib-rgb-init" title="xlib_rgb_init ()"><code class="function">xlib_rgb_init()</code></a> must be called before using any of the other
functions in XlibRGB.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>display</code></em> :</span></p></td>
<td> X display to use.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>screen</code></em> :</span></p></td>
<td> Screen to use.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>prefDepth</code></em> :</span></p></td>
<td> Visual depth to use for color substitution tables.  This must
be one of the supported visual depths in the specified <em class="parameter"><code>display</code></em>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="xlib-rgb-xpixel-from-rgb"></a><h3>xlib_rgb_xpixel_from_rgb ()</h3>
<pre class="programlisting">unsigned long       xlib_rgb_xpixel_from_rgb            (<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
>guint32</a> rgb);</pre>
<p>
Converts an RGB triplet into the closest color that XlibRGB visual can
handle.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>rgb</code></em> :</span></p></td>
<td> 32-bit representation of an RGB value, specified as 0x00RRGGBB.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> X pixel value that corresponds to the closest color in the
XlibRGB visual and colormap.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="xlib-rgb-gc-set-foreground"></a><h3>xlib_rgb_gc_set_foreground ()</h3>
<pre class="programlisting">void                xlib_rgb_gc_set_foreground          (GC gc,
                                                         <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
>guint32</a> rgb);</pre>
<p>
This is a convenience function to set the foreground of a GC from an RGB
triplet.  It calls <a class="link" href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#xlib-rgb-xpixel-from-rgb" title="xlib_rgb_xpixel_from_rgb ()"><code class="function">xlib_rgb_xpixel_from_rgb()</code></a> internally and uses the
returned pixel value to set the GC's foreground.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>gc</code></em> :</span></p></td>
<td> A graphic context.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>rgb</code></em> :</span></p></td>
<td> 32-bit representation of an RGB value, specified as 0x00RRGGBB.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="xlib-rgb-gc-set-background"></a><h3>xlib_rgb_gc_set_background ()</h3>
<pre class="programlisting">void                xlib_rgb_gc_set_background          (GC gc,
                                                         <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
>guint32</a> rgb);</pre>
<p>
This is a convenience function to set the background of a GC from an RGB
triplet.  It calls <a class="link" href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#xlib-rgb-xpixel-from-rgb" title="xlib_rgb_xpixel_from_rgb ()"><code class="function">xlib_rgb_xpixel_from_rgb()</code></a> internally and uses the
returned pixel value to set the GC's background.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>gc</code></em> :</span></p></td>
<td> A graphic context.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>rgb</code></em> :</span></p></td>
<td> 32-bit representation of an RGB value, specified as 0x00RRGGBB.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="xlib-draw-rgb-image"></a><h3>xlib_draw_rgb_image ()</h3>
<pre class="programlisting">void                xlib_draw_rgb_image                 (Drawable drawable,
                                                         GC gc,
                                                         int x,
                                                         int y,
                                                         int width,
                                                         int height,
                                                         <a class="link" href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#XlibRgbDither" title="enum XlibRgbDither">XlibRgbDither</a> dith,
                                                         unsigned char *rgb_buf,
                                                         int rowstride);</pre>
<p>
Renders an RGB buffer to a drawable.  Pixels are specified as RGB triplets
with 8 bits per channel.  An image will thus look like an RGBRGBRGBRGB
sequence of 8-bit values.  This function does not let you specify dither
offsets; applications that need to render partial regions of a buffer to
build the final image should use <a class="link" href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#xlib-draw-rgb-image-dithalign" title="xlib_draw_rgb_image_dithalign ()"><code class="function">xlib_draw_rgb_image_dithalign()</code></a> instead.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>drawable</code></em> :</span></p></td>
<td> Destination drawable.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>gc</code></em> :</span></p></td>
<td> A graphic context.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
<td> Leftmost coordinate of the destination rectangle.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
<td> Upper coordinate of the destination rectangle.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
<td> Width of the destination rectangle, in pixels.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>height</code></em> :</span></p></td>
<td> Height of the destination rectangle, in pixels.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>dith</code></em> :</span></p></td>
<td> Dithering method to use.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>rgb_buf</code></em> :</span></p></td>
<td> Pointer to the pixel in the RGB buffer that corresponds to the
upper-left corner of the rectangular region to render.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>rowstride</code></em> :</span></p></td>
<td> Offset between pixel rows in the RGB buffer, in bytes.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="xlib-draw-rgb-image-dithalign"></a><h3>xlib_draw_rgb_image_dithalign ()</h3>
<pre class="programlisting">void                xlib_draw_rgb_image_dithalign       (Drawable drawable,
                                                         GC gc,
                                                         int x,
                                                         int y,
                                                         int width,
                                                         int height,
                                                         <a class="link" href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#XlibRgbDither" title="enum XlibRgbDither">XlibRgbDither</a> dith,
                                                         unsigned char *rgb_buf,
                                                         int rowstride,
                                                         int xdith,
                                                         int ydith);</pre>
<p>
Renders an RGB buffer to a drawable.  Pixels are specified as RGB triplets
with 8 bits per channel.  An image will thus look like an RGBRGBRGBRGB
sequence of 8-bit values.  This function lets you specify a pair of dither
offsets.  It should be used when you need to render regions of an RGB buffer
separately to form the final image; the dither offsets let you align the
dither mask appropriately.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>drawable</code></em> :</span></p></td>
<td> Destination drawable.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>gc</code></em> :</span></p></td>
<td> A graphic context.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
<td> Leftmost coordinate of the destination rectangle.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
<td> Upper coordinate of the destination rectangle.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
<td> Width of the destination rectangle, in pixels.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>height</code></em> :</span></p></td>
<td> Height of the destination rectangle, in pixels.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>dith</code></em> :</span></p></td>
<td> Dithering method to use.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>rgb_buf</code></em> :</span></p></td>
<td> Pointer to the pixel in the RGB buffer that corresponds to the
upper-left corner of the rectangular region to render.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>rowstride</code></em> :</span></p></td>
<td> Offset between pixel rows in the RGB buffer, in bytes.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>xdith</code></em> :</span></p></td>
<td> X offset for the dither mask.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>ydith</code></em> :</span></p></td>
<td> Y offset for the dither mask.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="xlib-draw-rgb-32-image"></a><h3>xlib_draw_rgb_32_image ()</h3>
<pre class="programlisting">void                xlib_draw_rgb_32_image              (Drawable drawable,
                                                         GC gc,
                                                         int x,
                                                         int y,
                                                         int width,
                                                         int height,
                                                         <a class="link" href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#XlibRgbDither" title="enum XlibRgbDither">XlibRgbDither</a> dith,
                                                         unsigned char *buf,
                                                         int rowstride);</pre>
<p>
This function is analogous to <a class="link" href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#xlib-draw-rgb-image" title="xlib_draw_rgb_image ()"><code class="function">xlib_draw_rgb_image()</code></a>, but it lets you use
32-bit RGB buffers with pixels specified as 0xRRGGBB00.  The
least-significant 8 bits are actually discarded.  This function can lead to
faster results than <a class="link" href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#xlib-draw-rgb-image" title="xlib_draw_rgb_image ()"><code class="function">xlib_draw_rgb_image()</code></a> since the pixels are aligned on
32-bit boundaries.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>drawable</code></em> :</span></p></td>
<td> Destination drawable.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>gc</code></em> :</span></p></td>
<td> A graphic context.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
<td> Leftmost coordinate of the destination rectangle.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
<td> Upper coordinate of the destination rectangle.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
<td> Width of the destination rectangle, in pixels.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>height</code></em> :</span></p></td>
<td> Height of the destination rectangle, in pixels.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>dith</code></em> :</span></p></td>
<td> Dithering method to use.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>buf</code></em> :</span></p></td>
<td> Pointer to the pixel in the RGB buffer that corresponds to the
upper-left corner of the rectangular region to render.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>rowstride</code></em> :</span></p></td>
<td> Offset between pixel rows in the RGB buffer, in bytes.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="xlib-draw-gray-image"></a><h3>xlib_draw_gray_image ()</h3>
<pre class="programlisting">void                xlib_draw_gray_image                (Drawable drawable,
                                                         GC gc,
                                                         int x,
                                                         int y,
                                                         int width,
                                                         int height,
                                                         <a class="link" href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#XlibRgbDither" title="enum XlibRgbDither">XlibRgbDither</a> dith,
                                                         unsigned char *buf,
                                                         int rowstride);</pre>
<p>
Renders a grayscale buffer to a drawable.  Pixels are specified as 8-bit
intensity values.  An image will thus look as a GGGGGG sequence of 8-bit
values.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>drawable</code></em> :</span></p></td>
<td> Destination drawable.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>gc</code></em> :</span></p></td>
<td> A graphic context.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
<td> Leftmost coordinate of the destination rectangle.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
<td> Upper coordinate of the destination rectangle.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
<td> Width of the destination rectangle, in pixels.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>height</code></em> :</span></p></td>
<td> Height of thd destination rectangle, in pixels.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>dith</code></em> :</span></p></td>
<td> Dithering method to use.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>buf</code></em> :</span></p></td>
<td> Pointer to the pixel in the grayscale buffer that corresponds to the
upper-left corner of the rectangular region to render.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>rowstride</code></em> :</span></p></td>
<td> Offset between pixel rows in the grayscale buffer, in pixels.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="xlib-rgb-cmap-new"></a><h3>xlib_rgb_cmap_new ()</h3>
<pre class="programlisting"><a class="link" href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#XlibRgbCmap" title="XlibRgbCmap">XlibRgbCmap</a> *       xlib_rgb_cmap_new                   (<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
>guint32</a> *colors,
                                                         int n_colors);</pre>
<p>
FIXME</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>colors</code></em> :</span></p></td>
<td> FIXME
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>n_colors</code></em> :</span></p></td>
<td> FIXME
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> FIXME
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="xlib-rgb-cmap-free"></a><h3>xlib_rgb_cmap_free ()</h3>
<pre class="programlisting">void                xlib_rgb_cmap_free                  (<a class="link" href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#XlibRgbCmap" title="XlibRgbCmap">XlibRgbCmap</a> *cmap);</pre>
<p>
Frees an XlibRGB colormap.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>cmap</code></em> :</span></p></td>
<td> An XlibRGB colormap.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="xlib-draw-indexed-image"></a><h3>xlib_draw_indexed_image ()</h3>
<pre class="programlisting">void                xlib_draw_indexed_image             (Drawable drawable,
                                                         GC gc,
                                                         int x,
                                                         int y,
                                                         int width,
                                                         int height,
                                                         <a class="link" href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#XlibRgbDither" title="enum XlibRgbDither">XlibRgbDither</a> dith,
                                                         unsigned char *buf,
                                                         int rowstride,
                                                         <a class="link" href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#XlibRgbCmap" title="XlibRgbCmap">XlibRgbCmap</a> *cmap);</pre>
<p>
FIXME</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>drawable</code></em> :</span></p></td>
<td> FIXME
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>gc</code></em> :</span></p></td>
<td> FIXME
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
<td> FIXME
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
<td> FIXME
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
<td> FIXME
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>height</code></em> :</span></p></td>
<td> FIXME
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>dith</code></em> :</span></p></td>
<td> FIXME
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>buf</code></em> :</span></p></td>
<td> FIXME
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>rowstride</code></em> :</span></p></td>
<td> FIXME
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cmap</code></em> :</span></p></td>
<td> FIXME
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="xlib-rgb-ditherable"></a><h3>xlib_rgb_ditherable ()</h3>
<pre class="programlisting">Bool                xlib_rgb_ditherable                 (void);</pre>
<p>
Queries whether XlibRGB supports dithering for its chosen visual.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> TRUE if dithering can be performed for the visual that XlibRGB
is using, FALSE otherwise.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="xlib-rgb-set-verbose"></a><h3>xlib_rgb_set_verbose ()</h3>
<pre class="programlisting">void                xlib_rgb_set_verbose                (Bool verbose);</pre>
<p>
Enables/disables debug spew.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>verbose</code></em> :</span></p></td>
<td> <code class="literal">True</code> to be verbose
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="xlib-rgb-set-install"></a><h3>xlib_rgb_set_install ()</h3>
<pre class="programlisting">void                xlib_rgb_set_install                (Bool install);</pre>
<p>
Sets whether we install an RGB colormap.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>install</code></em> :</span></p></td>
<td> <code class="literal">True</code> to install a colormap
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="xlib-rgb-set-min-colors"></a><h3>xlib_rgb_set_min_colors ()</h3>
<pre class="programlisting">void                xlib_rgb_set_min_colors             (int min_colors);</pre>
<p>
Sets the minimum number of colors in the color cube.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>min_colors</code></em> :</span></p></td>
<td> minimum colors to use
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="xlib-rgb-get-cmap"></a><h3>xlib_rgb_get_cmap ()</h3>
<pre class="programlisting">Colormap            xlib_rgb_get_cmap                   (void);</pre>
<p>
Queries the X colormap that XlibRGB is using.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> An X colormap.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="xlib-rgb-get-visual"></a><h3>xlib_rgb_get_visual ()</h3>
<pre class="programlisting">Visual *            xlib_rgb_get_visual                 (void);</pre>
<p>
Queries the visual that XlibRGB is using.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> An X visual.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="xlib-rgb-get-visual-info"></a><h3>xlib_rgb_get_visual_info ()</h3>
<pre class="programlisting">XVisualInfo *       xlib_rgb_get_visual_info            (void);</pre>
<p>
Queries the visual info structure for the visual that XlibRGB is using.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> An XVisualInfo structure.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="xlib-rgb-get-depth"></a><h3>xlib_rgb_get_depth ()</h3>
<pre class="programlisting">int                 xlib_rgb_get_depth                  (void);</pre>
<p>
Queries the depth of the visual that XlibRGB is using.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> Bit depth.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="xlib-rgb-get-display"></a><h3>xlib_rgb_get_display ()</h3>
<pre class="programlisting">Display *           xlib_rgb_get_display                (void);</pre>
<p>
Queries the X display that XlibRGB is using.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> An X display.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="xlib-rgb-get-screen"></a><h3>xlib_rgb_get_screen ()</h3>
<pre class="programlisting">Screen *            xlib_rgb_get_screen                 (void);</pre>
<p>
Queries the screen that XlibRGB is using.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> An X screen.
</td>
</tr></tbody>
</table></div>
</div>
</div>
<div class="refsect1" lang="en">
<a name="gdk-pixbuf-gdk-pixbuf-xlib-rgb.see-also"></a><h2>See Also</h2>
<p>
    GdkRGB
  </p>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.11</div>
</body>
</html>
